package com.whmskj.xjlhbc.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 设备管理看板
 */
@Data
@Schema(name = "设备管理看板响应参数",description = "设备管理看板响应参数")
public class JtKbDto {

    @Schema(description = "机台实时状态")
    private ZtDto zt = new ZtDto();

    @Schema(description = "本月设备维保统计")
    private TjDto wbtj = new TjDto();

    @Schema(description = "本月设备维修统计")
    private TjDto wxtj = new TjDto();

    @Schema(description = "本月设备维保次数曲线")
    private ChartDto chart = new ChartDto();

    @Schema(description = "本年设备故障类型占比")
    private List<GzDto> gz = new ArrayList<>();

    @Schema(description = "本年维修次数排行")
    private List<WxDto> wx = new ArrayList<>();


    @Data
    @Schema(name = "设备管理看板-机台实时状态响应参数",description = "设备管理看板-机台实时状态响应参数")
    public static class ZtDto{
        @Schema(description = "运行")
        private String yx="0";

        @Schema(description = "临停")
        private String lt="0";

        @Schema(description = "待机")
        private String dj="0";

        @Schema(description = "离线")
        private String lx="0";

    }

    @Data
    @Schema(name = "设备管理看板-本月设备维保维修统计响应参数",description = "设备管理看板-本月设备维保维修统计响应参数")
    public static class TjDto{
        @Schema(description = "织布车间")
        private String zb="0.00";

        @Schema(description = "准整车间")
        private String zz="0.00";
    }

    @Data
    @Schema(name = "设备管理看板-本月设备维保次数曲线响应参数",description = "设备管理看板-本月设备维保次数曲线响应参数")
    public static class ChartDto{
        private List<String> xData = new ArrayList<>();
        private List<Integer> value = new ArrayList<>();
    }

    @Data
    @Schema(name = "设备管理看板-本年设备故障类型占比响应参数",description = "设备管理看板-本年设备故障类型占比响应参数")
    public static class GzDto{
        private String name;

        private String value;
    }

    @Data
    @Schema(name = "设备管理看板-本年维修次数排行响应参数",description = "设备管理看板-本年维修次数排行响应参数")
    public static class WxDto{
        @Schema(description = "机台编号")
        private String jth;

        @Schema(description = "故障次数")
        private String total;

        @Schema(description = "耗时")
        private String hs;
    }

}
